<?php

namespace App\Providers;

use Illuminate\Support\ServiceProvider;

use Illuminate\Support\Facades\Redis;

class AppServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        if ($this->app->environment() !== 'production') {
            $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
        }
        //
        view()->composer(['web.layout.footer_ware1'], function ($view){
            $systemInfo = \Cache::remember('systemCateInfo',0,function(){
                $api = 'footer';
                return http_web(['get',$api])->send();
            });
            $view->with('systemInfo',$systemInfo['data']);
        });
    }

    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        //
    }
}
